import { extendClassProps, reactArray, UniteChanged } from "xbsj-base";
import { ESObjectWithLocation } from "../base/ESObjectWithLocation";
import { ESJColor, ESJVector3D } from "../../ESJTypes";

export class ESBoxEntity extends ESObjectWithLocation {
    static type = this.register('ESBoxEntity', this, { chsName: '实例盒子', tags: ['ESObjects'], description: "Cesium Entity box" });
    get typeName() { return 'ESBoxEntity'; }
    override get defaultProps() { return ESBoxEntity.createDefaultProps(); }

    static override defaults = {
        ...ESObjectWithLocation.defaults,
    }

    constructor(id?: string) {
        super(id);
    }
}

export namespace ESBoxEntity {
    export const createDefaultProps = () => ({
        size: reactArray<ESJVector3D>([50, 50, 50]),
        color: reactArray<ESJColor>([1, 1, 1, 1]),
        ...ESObjectWithLocation.createDefaultProps(),
    });
}
extendClassProps(ESBoxEntity.prototype, ESBoxEntity.createDefaultProps);
export interface ESBoxEntity extends UniteChanged<ReturnType<typeof ESBoxEntity.createDefaultProps>> { }



